home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / dmamap.h.z / dmamap.h
C/C++ Source or Header  |  1992-04-03  |  2KB  |  63 lines

  1. #ifndef __SYS_DMAMAP_H__
  2. #define __SYS_DMAMAP_H__
  3.  
  4. /**************************************************************************
  5.  *                                      *
  6.  *          Copyright (C) 1987, Silicon Graphics, Inc.          *
  7.  *                                      *
  8.  *  These coded instructions, statements, and computer programs  contain  *
  9.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  10.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  11.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  12.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  13.  *                                      *
  14.  **************************************************************************/
  15. #ident "$Revision: 3.9 $"
  16.  
  17. /*
  18.  * Definitions for allocating, freeing, and using DMA maps
  19.  */
  20.  
  21. /*
  22.  * DMA map types
  23.  */
  24. #define    DMA_SCSI    0
  25. #define    DMA_A24VME    1        /* PowerSeries only */
  26. #define    DMA_A32VME    2        /* PowerSeries only */
  27.  
  28. /*
  29.  * DMA map structure as returned by dma_mapalloc()
  30.  */
  31. typedef struct dmamap {
  32.     int    dma_type;    /* Map type (see above) */
  33.     int    dma_adap;    /* I/O adapter */
  34.     int    dma_index;    /* Beginning map register to use */
  35.     int    dma_size;    /* Number of map registers to use */
  36.     uint    dma_addr;    /* Corresponding bus address for A24/A32 */
  37.     uint    dma_virtaddr;    /* Beginning virtual address that is mapped */
  38. } dmamap_t;
  39.  
  40. /*
  41.  * Prototypes of exported functions
  42.  */
  43. extern dmamap_t    *dma_mapalloc(int, int, int, int);
  44. extern void    dma_mapfree(dmamap_t *);
  45. extern int    dma_map(dmamap_t *, caddr_t, int);
  46. extern uint    dma_mapaddr(dmamap_t *, caddr_t);
  47.  
  48. /*
  49.  * These variables are defined in master.d/kernel
  50.  */
  51. extern struct map *scsimap[];
  52. extern struct map *a24map[];
  53. extern struct map *a32map[];
  54.  
  55. extern int scsi_mapsize;
  56. extern int a24_mapsize;
  57. extern int a32_mapsize;
  58.  
  59. extern lock_t dmamaplock;
  60. extern sema_t dmamapout;
  61.  
  62. #endif /* __SYS_DMAMAP_H__ */
  63.